package settings.action;

import java.util.List;
import settings.model.Table;
import settings.service.TableManager;

import com.opensymphony.xwork2.ActionSupport;

public class SelectTableAction extends ActionSupport {

	private static final long serialVersionUID = 1L;
	
	private TableManager tableManager;
	
	private List<Table> tables;
	
	public TableManager getTableManager() {
		return tableManager;
	}

	public void setTableManager(TableManager tableManager) {
		this.tableManager = tableManager;
	}

	public List<Table> getTables() {
		return tables;
	}

	public void setTables(List<Table> tables) {
		this.tables = tables;
	}

	public String execute() throws Exception
	{
		List<Table> listTables = tableManager.getAllTable();
		setTables(listTables);
		return SUCCESS;
	}

}
